<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>knet: E:/knet-git/knet/knet/channel_ref_api.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">knet
   &#160;<span id="projectnumber">1.4.5</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>结构体</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>全局定义</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e74998c9a9305a116abc25fcf9a1edb.html">knet-git</a></li><li class="navelem"><a class="el" href="dir_a1c045b39f32066568ae964b52db514f.html">knet</a></li><li class="navelem"><a class="el" href="dir_f76d03789f0b12416cfffea59e2ed47d.html">knet</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">channel_ref_api.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00053.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2014-2015, dennis wang</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * All rights reserved.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * </span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *     * Redistributions of source code must retain the above copyright</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *       notice, this list of conditions and the following disclaimer.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *     * Redistributions in binary form must reproduce the above copyright</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *       notice, this list of conditions and the following disclaimer in the</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *       documentation and/or other materials provided with the distribution.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * </span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * DISCLAIMED. IN NO EVENT SHALL dennis wang BE LIABLE FOR ANY</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#ifndef CHANNEL_REF_API_H</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#define CHANNEL_REF_API_H</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00054.html">config.h</a>&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="keyword">extern</span> <a class="code" href="a00005.html">kchannel_ref_t</a>* <a class="code" href="a00109_ga45710b87649c232603ae708616eddd85.html#ga45710b87649c232603ae708616eddd85">knet_channel_ref_share</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="a00109_ga6eded28dc89d84e8ed33615bbd205bae.html#ga6eded28dc89d84e8ed33615bbd205bae">knet_channel_ref_leave</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="a00109_ga92a683023f347ae7c4eb692180884a01.html#ga92a683023f347ae7c4eb692180884a01">knet_channel_ref_accept</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref, <span class="keyword">const</span> <span class="keywordtype">char</span>* ip, <span class="keywordtype">int</span> port, <span class="keywordtype">int</span> backlog);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="a00109_gad8fc0ffe3928e6914b3ec50810e2e79f.html#gad8fc0ffe3928e6914b3ec50810e2e79f">knet_channel_ref_connect</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref, <span class="keyword">const</span> <span class="keywordtype">char</span>* ip, <span class="keywordtype">int</span> port, <span class="keywordtype">int</span> timeout);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="a00109_gad63e9094fa461829bf91cf8b50d98f21.html#gad63e9094fa461829bf91cf8b50d98f21">knet_channel_ref_reconnect</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref, <span class="keywordtype">int</span> timeout);</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="a00109_gad86b8f0e35f643881f521a1c49f85c76.html#gad86b8f0e35f643881f521a1c49f85c76">knet_channel_ref_set_auto_reconnect</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref, <span class="keywordtype">int</span> auto_reconnect);</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="a00109_gae0a3f38cfb6a397a4c810cd8c162c37f.html#gae0a3f38cfb6a397a4c810cd8c162c37f">knet_channel_ref_check_auto_reconnect</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="a00109_gae6b27f8bb8c72932a086dc20a4582527.html#gae6b27f8bb8c72932a086dc20a4582527">knet_channel_ref_check_balance</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="a00109_ga902f5bad47644b56ff5d9a4ecf152abb.html#ga902f5bad47644b56ff5d9a4ecf152abb">knet_channel_ref_check_state</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref, <a class="code" href="a00054_a74ff83eaafca5c7093accdc65c6b0646.html#a74ff83eaafca5c7093accdc65c6b0646">knet_channel_state_e</a> state);</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="a00109_gaf7ce59d20d4e716707bea7dec42811c3.html#gaf7ce59d20d4e716707bea7dec42811c3">knet_channel_ref_close</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="a00109_gad844fbd8ee19d3cbcc2ad7822b0d5a2c.html#gad844fbd8ee19d3cbcc2ad7822b0d5a2c">knet_channel_ref_check_close</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;<span class="keyword">extern</span> <a class="code" href="a00054_a0d9e0afbf02fb6ed6c5b1415dce51b05.html#a0d9e0afbf02fb6ed6c5b1415dce51b05">socket_t</a> <a class="code" href="a00109_ga58380a92125ad1a79ecbae828b8e9755.html#ga58380a92125ad1a79ecbae828b8e9755">knet_channel_ref_get_socket_fd</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;<span class="keyword">extern</span> <a class="code" href="a00035.html">kstream_t</a>* <a class="code" href="a00109_gaa96ef131ed8d43d529a76ce1c9aea1a3.html#gaa96ef131ed8d43d529a76ce1c9aea1a3">knet_channel_ref_get_stream</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="keyword">extern</span> <a class="code" href="a00033.html">kloop_t</a>* <a class="code" href="a00109_ga32ac938704d08913a296bf9a7443632e.html#ga32ac938704d08913a296bf9a7443632e">knet_channel_ref_get_loop</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="a00109_ga7c0a36ca7b0f62985b64915f2e5cd947.html#ga7c0a36ca7b0f62985b64915f2e5cd947">knet_channel_ref_set_cb</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref, <a class="code" href="a00054_a8a7d96123ef4565c6d08fe58a10476a9.html#a8a7d96123ef4565c6d08fe58a10476a9">knet_channel_ref_cb_t</a> cb);</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="a00109_ga81b273235ae5970b4642a961744315d6.html#ga81b273235ae5970b4642a961744315d6">knet_channel_ref_set_timeout</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref, <span class="keywordtype">int</span> timeout);</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;<span class="keyword">extern</span> <a class="code" href="a00001.html">kaddress_t</a>* <a class="code" href="a00109_gac54b0999f21b2f481f7b8ebd17699655.html#gac54b0999f21b2f481f7b8ebd17699655">knet_channel_ref_get_peer_address</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;<span class="keyword">extern</span> <a class="code" href="a00001.html">kaddress_t</a>* <a class="code" href="a00109_gaddc78bbbcee3974d351c2c1ec0340e3e.html#gaddc78bbbcee3974d351c2c1ec0340e3e">knet_channel_ref_get_local_address</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="keyword">extern</span> uint64_t <a class="code" href="a00109_ga33f0ef5b9b57ff12a51579e222807335.html#ga33f0ef5b9b57ff12a51579e222807335">knet_channel_ref_get_uuid</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="a00109_ga021034214898a7509914a336a1afb47a.html#ga021034214898a7509914a336a1afb47a">knet_channel_ref_equal</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* a, <a class="code" href="a00005.html">kchannel_ref_t</a>* b);</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="a00109_ga21f85fcd9fe24484f3dbe368eac5e9bb.html#ga21f85fcd9fe24484f3dbe368eac5e9bb">knet_channel_ref_set_user_data</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref, <span class="keywordtype">void</span>* data);</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span>* <a class="code" href="a00109_gabd02f58cb58b94071796e06bad804369.html#gabd02f58cb58b94071796e06bad804369">knet_channel_ref_get_user_data</a>(<a class="code" href="a00005.html">kchannel_ref_t</a>* channel_ref);</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* CHANNEL_REF_API_H */</span><span class="preprocessor"></span></div>
<div class="ttc" id="a00109_gae0a3f38cfb6a397a4c810cd8c162c37f_html_gae0a3f38cfb6a397a4c810cd8c162c37f"><div class="ttname"><a href="a00109_gae0a3f38cfb6a397a4c810cd8c162c37f.html#gae0a3f38cfb6a397a4c810cd8c162c37f">knet_channel_ref_check_auto_reconnect</a></div><div class="ttdeci">int knet_channel_ref_check_auto_reconnect(kchannel_ref_t *channel_ref)</div><div class="ttdoc">检查管道是否开启了自动重连 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:223</div></div>
<div class="ttc" id="a00109_ga6eded28dc89d84e8ed33615bbd205bae_html_ga6eded28dc89d84e8ed33615bbd205bae"><div class="ttname"><a href="a00109_ga6eded28dc89d84e8ed33615bbd205bae.html#ga6eded28dc89d84e8ed33615bbd205bae">knet_channel_ref_leave</a></div><div class="ttdeci">void knet_channel_ref_leave(kchannel_ref_t *channel_ref)</div><div class="ttdoc">减少管道引用计数，并销毁kchannel_ref_t实例 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:276</div></div>
<div class="ttc" id="a00109_gaddc78bbbcee3974d351c2c1ec0340e3e_html_gaddc78bbbcee3974d351c2c1ec0340e3e"><div class="ttname"><a href="a00109_gaddc78bbbcee3974d351c2c1ec0340e3e.html#gaddc78bbbcee3974d351c2c1ec0340e3e">knet_channel_ref_get_local_address</a></div><div class="ttdeci">kaddress_t * knet_channel_ref_get_local_address(kchannel_ref_t *channel_ref)</div><div class="ttdoc">取得本地地址 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:724</div></div>
<div class="ttc" id="a00054_a8a7d96123ef4565c6d08fe58a10476a9_html_a8a7d96123ef4565c6d08fe58a10476a9"><div class="ttname"><a href="a00054_a8a7d96123ef4565c6d08fe58a10476a9.html#a8a7d96123ef4565c6d08fe58a10476a9">knet_channel_ref_cb_t</a></div><div class="ttdeci">void(* knet_channel_ref_cb_t)(kchannel_ref_t *, knet_channel_cb_event_e)</div><div class="ttdef"><b>Definition:</b> config.h:293</div></div>
<div class="ttc" id="a00001_html"><div class="ttname"><a href="a00001.html">_address_t</a></div><div class="ttdef"><b>Definition:</b> address.c:27</div></div>
<div class="ttc" id="a00109_gad63e9094fa461829bf91cf8b50d98f21_html_gad63e9094fa461829bf91cf8b50d98f21"><div class="ttname"><a href="a00109_gad63e9094fa461829bf91cf8b50d98f21.html#gad63e9094fa461829bf91cf8b50d98f21">knet_channel_ref_reconnect</a></div><div class="ttdeci">int knet_channel_ref_reconnect(kchannel_ref_t *channel_ref, int timeout)</div><div class="ttdoc">重新发起连接 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:160</div></div>
<div class="ttc" id="a00035_html"><div class="ttname"><a href="a00035.html">_stream_t</a></div><div class="ttdef"><b>Definition:</b> stream.c:33</div></div>
<div class="ttc" id="a00109_gad86b8f0e35f643881f521a1c49f85c76_html_gad86b8f0e35f643881f521a1c49f85c76"><div class="ttname"><a href="a00109_gad86b8f0e35f643881f521a1c49f85c76.html#gad86b8f0e35f643881f521a1c49f85c76">knet_channel_ref_set_auto_reconnect</a></div><div class="ttdeci">void knet_channel_ref_set_auto_reconnect(kchannel_ref_t *channel_ref, int auto_reconnect)</div><div class="ttdoc">设置管道自动重连 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:218</div></div>
<div class="ttc" id="a00054_a74ff83eaafca5c7093accdc65c6b0646_html_a74ff83eaafca5c7093accdc65c6b0646"><div class="ttname"><a href="a00054_a74ff83eaafca5c7093accdc65c6b0646.html#a74ff83eaafca5c7093accdc65c6b0646">knet_channel_state_e</a></div><div class="ttdeci">enum _channel_state_e knet_channel_state_e</div></div>
<div class="ttc" id="a00109_gad844fbd8ee19d3cbcc2ad7822b0d5a2c_html_gad844fbd8ee19d3cbcc2ad7822b0d5a2c"><div class="ttname"><a href="a00109_gad844fbd8ee19d3cbcc2ad7822b0d5a2c.html#gad844fbd8ee19d3cbcc2ad7822b0d5a2c">knet_channel_ref_check_close</a></div><div class="ttdeci">int knet_channel_ref_check_close(kchannel_ref_t *channel_ref)</div><div class="ttdoc">检查管道是否已经关闭 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:331</div></div>
<div class="ttc" id="a00109_ga902f5bad47644b56ff5d9a4ecf152abb_html_ga902f5bad47644b56ff5d9a4ecf152abb"><div class="ttname"><a href="a00109_ga902f5bad47644b56ff5d9a4ecf152abb.html#ga902f5bad47644b56ff5d9a4ecf152abb">knet_channel_ref_check_state</a></div><div class="ttdeci">int knet_channel_ref_check_state(kchannel_ref_t *channel_ref, knet_channel_state_e state)</div><div class="ttdoc">检测管道当前状态 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:443</div></div>
<div class="ttc" id="a00109_ga45710b87649c232603ae708616eddd85_html_ga45710b87649c232603ae708616eddd85"><div class="ttname"><a href="a00109_ga45710b87649c232603ae708616eddd85.html#ga45710b87649c232603ae708616eddd85">knet_channel_ref_share</a></div><div class="ttdeci">kchannel_ref_t * knet_channel_ref_share(kchannel_ref_t *channel_ref)</div><div class="ttdoc">增加管道引用计数，并创建与管道关联的新的kchannel_ref_t实例 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:262</div></div>
<div class="ttc" id="a00109_gabd02f58cb58b94071796e06bad804369_html_gabd02f58cb58b94071796e06bad804369"><div class="ttname"><a href="a00109_gabd02f58cb58b94071796e06bad804369.html#gabd02f58cb58b94071796e06bad804369">knet_channel_ref_get_user_data</a></div><div class="ttdeci">void * knet_channel_ref_get_user_data(kchannel_ref_t *channel_ref)</div><div class="ttdoc">获取管道用户数据 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:794</div></div>
<div class="ttc" id="a00109_ga7c0a36ca7b0f62985b64915f2e5cd947_html_ga7c0a36ca7b0f62985b64915f2e5cd947"><div class="ttname"><a href="a00109_ga7c0a36ca7b0f62985b64915f2e5cd947.html#ga7c0a36ca7b0f62985b64915f2e5cd947">knet_channel_ref_set_cb</a></div><div class="ttdeci">void knet_channel_ref_set_cb(kchannel_ref_t *channel_ref, knet_channel_ref_cb_t cb)</div><div class="ttdoc">设置管道事件回调 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:696</div></div>
<div class="ttc" id="a00109_gac54b0999f21b2f481f7b8ebd17699655_html_gac54b0999f21b2f481f7b8ebd17699655"><div class="ttname"><a href="a00109_gac54b0999f21b2f481f7b8ebd17699655.html#gac54b0999f21b2f481f7b8ebd17699655">knet_channel_ref_get_peer_address</a></div><div class="ttdeci">kaddress_t * knet_channel_ref_get_peer_address(kchannel_ref_t *channel_ref)</div><div class="ttdoc">取得对端地址 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:714</div></div>
<div class="ttc" id="a00109_ga021034214898a7509914a336a1afb47a_html_ga021034214898a7509914a336a1afb47a"><div class="ttname"><a href="a00109_ga021034214898a7509914a336a1afb47a.html#ga021034214898a7509914a336a1afb47a">knet_channel_ref_equal</a></div><div class="ttdeci">int knet_channel_ref_equal(kchannel_ref_t *a, kchannel_ref_t *b)</div><div class="ttdoc">测试两个管道引用是否指向同一个管道 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:784</div></div>
<div class="ttc" id="a00005_html"><div class="ttname"><a href="a00005.html">_channel_ref_t</a></div><div class="ttdef"><b>Definition:</b> channel_ref.c:61</div></div>
<div class="ttc" id="a00054_a0d9e0afbf02fb6ed6c5b1415dce51b05_html_a0d9e0afbf02fb6ed6c5b1415dce51b05"><div class="ttname"><a href="a00054_a0d9e0afbf02fb6ed6c5b1415dce51b05.html#a0d9e0afbf02fb6ed6c5b1415dce51b05">socket_t</a></div><div class="ttdeci">#define socket_t</div><div class="ttdef"><b>Definition:</b> config.h:88</div></div>
<div class="ttc" id="a00109_ga33f0ef5b9b57ff12a51579e222807335_html_ga33f0ef5b9b57ff12a51579e222807335"><div class="ttname"><a href="a00109_ga33f0ef5b9b57ff12a51579e222807335.html#ga33f0ef5b9b57ff12a51579e222807335">knet_channel_ref_get_uuid</a></div><div class="ttdeci">uint64_t knet_channel_ref_get_uuid(kchannel_ref_t *channel_ref)</div><div class="ttdoc">获取管道UUID </div><div class="ttdef"><b>Definition:</b> channel_ref.c:779</div></div>
<div class="ttc" id="a00109_gae6b27f8bb8c72932a086dc20a4582527_html_gae6b27f8bb8c72932a086dc20a4582527"><div class="ttname"><a href="a00109_gae6b27f8bb8c72932a086dc20a4582527.html#gae6b27f8bb8c72932a086dc20a4582527">knet_channel_ref_check_balance</a></div><div class="ttdeci">int knet_channel_ref_check_balance(kchannel_ref_t *channel_ref)</div><div class="ttdoc">检测管道是否是通过负载均衡关联到当前的kloop_t </div><div class="ttdef"><b>Definition:</b> channel_ref.c:664</div></div>
<div class="ttc" id="a00109_ga21f85fcd9fe24484f3dbe368eac5e9bb_html_ga21f85fcd9fe24484f3dbe368eac5e9bb"><div class="ttname"><a href="a00109_ga21f85fcd9fe24484f3dbe368eac5e9bb.html#ga21f85fcd9fe24484f3dbe368eac5e9bb">knet_channel_ref_set_user_data</a></div><div class="ttdeci">void knet_channel_ref_set_user_data(kchannel_ref_t *channel_ref, void *data)</div><div class="ttdoc">设置管道用户数据 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:789</div></div>
<div class="ttc" id="a00054_html"><div class="ttname"><a href="a00054.html">config.h</a></div></div>
<div class="ttc" id="a00109_gad8fc0ffe3928e6914b3ec50810e2e79f_html_gad8fc0ffe3928e6914b3ec50810e2e79f"><div class="ttname"><a href="a00109_gad8fc0ffe3928e6914b3ec50810e2e79f.html#gad8fc0ffe3928e6914b3ec50810e2e79f">knet_channel_ref_connect</a></div><div class="ttdeci">int knet_channel_ref_connect(kchannel_ref_t *channel_ref, const char *ip, int port, int timeout)</div><div class="ttdoc">主动连接 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:116</div></div>
<div class="ttc" id="a00033_html"><div class="ttname"><a href="a00033.html">_loop_t</a></div><div class="ttdef"><b>Definition:</b> loop.c:36</div></div>
<div class="ttc" id="a00109_gaf7ce59d20d4e716707bea7dec42811c3_html_gaf7ce59d20d4e716707bea7dec42811c3"><div class="ttname"><a href="a00109_gaf7ce59d20d4e716707bea7dec42811c3.html#gaf7ce59d20d4e716707bea7dec42811c3">knet_channel_ref_close</a></div><div class="ttdeci">void knet_channel_ref_close(kchannel_ref_t *channel_ref)</div><div class="ttdoc">关闭管道 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:311</div></div>
<div class="ttc" id="a00109_ga81b273235ae5970b4642a961744315d6_html_ga81b273235ae5970b4642a961744315d6"><div class="ttname"><a href="a00109_ga81b273235ae5970b4642a961744315d6.html#ga81b273235ae5970b4642a961744315d6">knet_channel_ref_set_timeout</a></div><div class="ttdeci">void knet_channel_ref_set_timeout(kchannel_ref_t *channel_ref, int timeout)</div><div class="ttdoc">设置管道空闲超时 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:669</div></div>
<div class="ttc" id="a00109_gaa96ef131ed8d43d529a76ce1c9aea1a3_html_gaa96ef131ed8d43d529a76ce1c9aea1a3"><div class="ttname"><a href="a00109_gaa96ef131ed8d43d529a76ce1c9aea1a3.html#gaa96ef131ed8d43d529a76ce1c9aea1a3">knet_channel_ref_get_stream</a></div><div class="ttdeci">kstream_t * knet_channel_ref_get_stream(kchannel_ref_t *channel_ref)</div><div class="ttdoc">取得管道数据流 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:401</div></div>
<div class="ttc" id="a00109_ga32ac938704d08913a296bf9a7443632e_html_ga32ac938704d08913a296bf9a7443632e"><div class="ttname"><a href="a00109_ga32ac938704d08913a296bf9a7443632e.html#ga32ac938704d08913a296bf9a7443632e">knet_channel_ref_get_loop</a></div><div class="ttdeci">kloop_t * knet_channel_ref_get_loop(kchannel_ref_t *channel_ref)</div><div class="ttdoc">取得管道所关联的事件循环 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:406</div></div>
<div class="ttc" id="a00109_ga58380a92125ad1a79ecbae828b8e9755_html_ga58380a92125ad1a79ecbae828b8e9755"><div class="ttname"><a href="a00109_ga58380a92125ad1a79ecbae828b8e9755.html#ga58380a92125ad1a79ecbae828b8e9755">knet_channel_ref_get_socket_fd</a></div><div class="ttdeci">socket_t knet_channel_ref_get_socket_fd(kchannel_ref_t *channel_ref)</div><div class="ttdoc">取得管道套接字 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:396</div></div>
<div class="ttc" id="a00109_ga92a683023f347ae7c4eb692180884a01_html_ga92a683023f347ae7c4eb692180884a01"><div class="ttname"><a href="a00109_ga92a683023f347ae7c4eb692180884a01.html#ga92a683023f347ae7c4eb692180884a01">knet_channel_ref_accept</a></div><div class="ttdeci">int knet_channel_ref_accept(kchannel_ref_t *channel_ref, const char *ip, int port, int backlog)</div><div class="ttdoc">将管道转换为监听管道 </div><div class="ttdef"><b>Definition:</b> channel_ref.c:235</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2015年 七月 24日 星期五 11:53:43 , 为 knet使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
